class Person:
    def __init__(self, name):
        self.name = name 
        self.__age = 1
    def set_age(self, new_age):
        if 0 < new_age <= 120: 
            self.__age = new_age
    def get_age(self):
        return self.__age
person = Person("小明")
person.set_age(20)
print(f"年龄为{person.get_age()}岁")
